<template>
    <div class="reply" :class="align">
        <el-button type="primary" @click="goBack" class="fa fa-mail-reply"> &nbsp;&nbsp;返回</el-button>
        <slot></slot>
    </div>
</template>

<script>
    export default {
        name: 'vPageBack',
        props: {
            align: {
                type: String,
                default: function(){
                    return 'right'
                }
            }
        },
        methods:{
            goBack(){
                history.back(-1);
            }
        }
    }
</script>

<style lang="scss" scoped>
    @import '~sysStatic/css/theme/theme.scss';
    .reply{
        margin-bottom: $commomSpace;
        padding: 20px 20px;
        background-color: #fff;
        &.right{
            text-align: right;
        }
        &.left{
            text-align: left;
        }
        &.center{
            text-align: center;
        }
    }
</style>